package com.cskaoyan._05stringbuffer;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/16 14:36
 **/
/*
StringBuffer的构造方法
 */
public class Demo2 {
    public static void main(String[] args) {
        // public StringBuffer() // 默认容量是16
        StringBuffer sb = new StringBuffer();
        //public StringBuffer(int capacity)// 容量是capacity
        StringBuffer sb2 = new StringBuffer(20);
        //public StringBuffer(String str)// str的长度+16
        StringBuffer sb3 = new StringBuffer("abc");
    }
}
